home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / codelib2 / v_02_05 / 2n05062a < prev    next >
Encoding:
Text File  |  1995-11-01  |  204 b   |  18 lines

  1.  
  2. /*
  3.  * a traditional C implementation of strlen using
  4.  * subscript notation
  5.  */
  6. strlen(s)
  7.     char s[];
  8.     {
  9.     int i = 0;
  10.  
  11.     while (s[i] != '\0')
  12.         ++i;
  13.     return i;
  14.     }
  15.  
  16.  
  17.  
  18.